/*
 * Copyright (c) 2017 22420103@QQ.COM 版权所有
 */
package com.lehe.common;

import com.lehe.common.utils.AppConfig;

/**
 * 系统常量定义
 * @author 王丹
 * @since 2017-02-22
 */
public class Contants {

    public static final String CHARSET_UTF = "UTF-8";
    /** grant_type openID */
    public static final String GRANT_TYPE_QUERY_OPENID = "authorization_code";
    /** 信息配置文件 */
    public static final String CONFIG_FILE = "application.properties";

    public static final String SESSION_USER_KEY = "session_user_key";
    public static final String SESSION_ADMIN_USER_KEY = "session_admin_user_key";
    /** 微信公众号app_id */
    public static final String APP_ID = "wxa79e12d33f38c86e";
    /** 微信公众号app_secret */
    public static final String APP_SECRET = "3df529028bda55ae15fe17f66715fad2";
    // token
    public static final String TOKEN_FOR_KWINER = AppConfig.getInstance().getProperty("weixin.token");
    // aesKey
    public static final String AES_KEY_FOR_KWINER = AppConfig.getInstance().getProperty("weixin.aes_key");
    // grant_type
    public static final String GRANT_TYPE_FOR_KWINER = AppConfig.getInstance().getProperty("weixin.grant_type");

    public static final String WE_CHAT_BASE = "https://api.weixin.qq.com/cgi-bin";

    public static final String WE_CHAT_ACCESS_TOKEN_PARAM = "?access_token=%s";

    public static final String WE_CHAT_TOKEN = WE_CHAT_BASE + "/token";

    public static final String WE_CHAT_MENU_CREATE = WE_CHAT_BASE + "/menu/create";

    public static final String WE_CHAT_QUERY_USER_INFO = WE_CHAT_BASE + "/user/info";

    public static final String WE_CHAT_QUERY_MENU_GET = WE_CHAT_BASE + "/menu/get";

    //https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code
    public static final String WE_USER_OPENID = "https://api.weixin.qq.com/sns/oauth2/access_token";

    //https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN
    public static final String WE_USER_UNIONID = "https://api.weixin.qq.com/sns/userinfo";

    public static final String WE_CHAT_PAY_BASE = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack";

    public static final String PAY_KEY = "";

    public static final String PAY_MCH_ID = "";

    public static final String PAY_SEND_NAME = "";

    public static final String PAY_CERT_PATH = "";

    public static final String PAY_REDPACK_ALLOW_IP = AppConfig.getInstance().getProperty("redpack.allow.ip");

    public static final String PAY_REDPACK_TEST_IP = AppConfig.getInstance().getProperty("redpack.test.ip");

    public static final Integer ADMIN_USER_STATUS_ACTIVE = 0;

    public static final Integer ADMIN_USER_STATUS_FORBIDDEN = 1;

    public static final Long ADMIN_AGENT_ID = 9L;

    public static final Integer USER_CHARGE_SOURCE_TYPE_ADMIN = 0;

    public static final Integer USER_CHARGE_SOURCE_TYPE_WX = 1;
}
